package cn.stylefeng.guns.modular.order.mapper;

import java.util.List;
import java.util.Map;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.rest.transport.vo.GoodQueryVo;
import cn.stylefeng.guns.modular.storage.model.params.StorageOutParam;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import cn.stylefeng.guns.modular.order.entity.OrderTransport;
import cn.stylefeng.guns.modular.order.model.params.OrderTransportParam;
import cn.stylefeng.guns.modular.order.model.result.OrderTransportResult;
import cn.stylefeng.guns.modular.order.model.result.tmsAnalysis;

/**
 * 货运订单表 Mapper 接口
 */
public interface OrderTransportMapper extends BaseMapper<OrderTransport> {

    /**
     * 获取列表
     */
    List<OrderTransportResult> customList(@Param("paramCondition") OrderTransportParam paramCondition);

    /**
     * 获取map列表
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") OrderTransportParam paramCondition);

    /**
     * 获取分页实体列表
     */
    Page<OrderTransportResult> customPageList(@Param("page") Page page, @Param("paramCondition") OrderTransportParam paramCondition, @Param("condition") String condition, @Param("operateId")Long operateId);
    
    Page<tmsAnalysis> findTmsAnalysislist(@Param("page") Page page, @Param("paramCondition") OrderTransportParam paramCondition, @Param("condition") String condition, @Param("operateId")Long operateId);

    /**
     * 获取分页map列表
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") OrderTransportParam paramCondition);

	OrderTransport findByThelastone();

	List<OrderTransportResult> findListByids(@Param("array")Long[] ids);

	OrderTransportResult findBySpec(@Param("paramCondition")OrderTransportParam param,@Param("operateId")Long operateId);

	List<OrderTransportResult> findListBySpec(@Param("paramCondition")OrderTransportParam param, @Param("carnumbger")String carnumbger,@Param("carState")String carState);

	Page<OrderTransportResult> listgetUnit(@Param("page") Page page, @Param("paramCondition")OrderTransportParam param);

	OrderTransportResult unitDetailsSingle(@Param("paramCondition")OrderTransportParam param);

	List<OrderTransportResult> carDetailsSingle(@Param("paramCondition")OrderTransportParam orderTransportParam, @Param("carnumbger")String carnumbger,@Param("carState")String carState);

	Page<OrderTransportResult> dispatchlistPageBySpec(@Param("page")Page pageContext, @Param("paramCondition")OrderTransportParam param, @Param("condition")String condition, @Param("operateId")Long operateId);

	List<OrderTransportResult> carDetailsSingleToo(@Param("paramCondition")OrderTransportParam orderTransportParam, @Param("carId")Long carId, @Param("dispatch")String dispatch, @Param("operateId")Long operateId);

	List<OrderTransportResult> carDetailsSingleToo2(@Param("paramCondition")OrderTransportParam orderTransportParam, @Param("carId")Long carId, @Param("operateId")Long operateId);

	List<OrderTransportResult> findListByDeliverId(@Param("paramCondition")OrderTransportParam orderTransportParam, @Param("carnumbger")String carnumbger,@Param("carid")Long carid);

	List<OrderTransportResult> findByUL(@Param("paramCondition")OrderTransportParam orderTransportParam);
	boolean saveBatchList(@Param("list")List<OrderTransportParam> list);

	Page<OrderTransportResult> findByQuery(@Param("page") Page page, @Param("paramCondition")OrderTransportParam orderTransportParam, @Param("condition") String condition, @Param("operateId")Long operateId);

	Page<OrderTransportResult> listgetUnitNew(@Param("page") Page page, @Param("paramCondition")OrderTransportParam orderTransportParam);

	List<OrderTransportResult> findListBySpecNew(@Param("paramCondition")OrderTransportParam orderTransportParam,@Param("operateId")Long operateId);

	List<OrderTransportResult> findAutoPrintSum(@Param("paramCondition")OrderTransportParam orderTransportParam);

	List<OrderTransportResult> findListBySpecByGetUnitId(@Param("paramCondition")OrderTransportParam orderTransportParam,@Param("operateId")Long operateId);

	List<OrderTransportResult> listgetUnitNewNew(@Param("paramCondition")OrderTransportParam orderTransportParam,@Param("operateId")Long operateId);

	List<GoodQueryVo> goodQueryList(@Param("paramCondition") StorageOutParam param);


	List<OrderTransportResult> findListBySpecNewNew(@Param("paramCondition")OrderTransportParam param, @Param("carnumbger")String carnumbger,@Param("carState")String carState);

	List<OrderTransportResult> findListBySpecNewNewNew(@Param("paramCondition")OrderTransportParam orderTransportParam, @Param("dispatchNumber")String dispatchNumber, @Param("operateId")Long operateId);

	List<OrderTransportResult> findListBySpecNewsss(@Param("paramCondition")OrderTransportParam orderTransportParam, @Param("dispatchNumber")String dispatchNumber, @Param("operateId")Long operateId);

	Integer sumDayNewOrderCount(@Param("paramCondition")OrderTransportParam orderTransportParam);
	
	Integer sumDayWeiFaYunOrderCount(@Param("paramCondition")OrderTransportParam orderTransportParam);

	Double sumDayOrderVolume(@Param("paramCondition")OrderTransportParam orderTransportParam);

	Integer sumMonthNewOrderCount(@Param("paramCondition")OrderTransportParam orderTransportParam);

	Integer sumMonthYqianshouOrderCount(@Param("paramCondition")OrderTransportParam orderTransportParam);

	Double sumMonthOrderVolume(@Param("paramCondition")OrderTransportParam orderTransportParam);

	Integer sumMonthNewOrderCount2(@Param("paramCondition")OrderTransportParam orderTransportParam, @Param("month")String month);

	Integer sumMonthYqianshouOrderCount2(@Param("paramCondition")OrderTransportParam orderTransportParam, @Param("month")String month);

	Integer sumMonthYhuidanOrderCount(@Param("paramCondition")OrderTransportParam orderTransportParam3, @Param("month")String month);

	Page<OrderTransportResult> findDispatchPageBySpec(@Param("page")Page pageContext, @Param("paramCondition")OrderTransportParam orderTransportParam, @Param("condition")String condition, @Param("operateId")Long operateId);

	Page<OrderTransportResult> findOrderTransportCountBySpec(@Param("page")Page pageContext, @Param("paramCondition")OrderTransportParam orderTransportParam, @Param("condition")String condition, @Param("operateId")Long operateId);
	
	void updateBySpec(@Param("paramCondition")OrderTransportParam orderTransportParam);

	void updateBySpec2(@Param("paramCondition")OrderTransportParam orderTransportParam);

	OrderTransportResult findSumBySpec(@Param("paramCondition")OrderTransportParam orderTransportParam);

	List<OrderTransportResult> findGetUnitVol(@Param("operateId")Long operateId,@Param("xlbClientIdList")List<String> xlbClientIdList);

	List<OrderTransportResult> getUnitList(@Param("dispatchNumber")String dispatchNumber );


	OrderTransportResult checkyouwu(@Param("paramCondition")OrderTransportParam ch);

	OrderTransportResult carDetailsSingleToo1(@Param("paramCondition")OrderTransportParam oParam, @Param("carId")Long carId, @Param("operateId")Long operateId);

	List<OrderTransportResult> carDetailsSingleToo3(@Param("paramCondition")OrderTransportParam orderTransportParam);

	List<OrderTransportResult> findOrderTransportCountDataBySpec(@Param("paramCondition")OrderTransportParam orderTransportParam, @Param("month")String month);


	Page<OrderTransportResult> findAllOrder(@Param("page") Page page);

	List<OrderTransportResult> findStockPort(@Param("paramCondition")OrderTransportParam orderTransportParam2);

	OrderTransportResult findByTransportNumberOrOrderNumber(@Param("paramCondition")OrderTransportParam otp);

	List<OrderTransportResult> findPieceNumberNumBySpec(@Param("dispatchNumber")String dispatchNumber);

}
